/*年轻人，只管向前看，不要管自暴自弃者的话*/
package com.composetest.page.splash.navigation

import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import com.composetest.page.splash.SplashRoute
import com.composetest.ui.navigation.myComposable

const val SPLASH_ROUTE = "splash"

/**
 * 跳转到splash
 */
fun NavController.navigationToSplash(): Unit {
    navigate(SPLASH_ROUTE)
}

/**
 * 配置导航
 */
fun NavGraphBuilder.splashScreen(toGuide: () -> Unit, toMain: () -> Unit): Unit {
    myComposable(SPLASH_ROUTE) {
        SplashRoute(toGuide = toGuide, toMain = toMain)
    }
}
